home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / surfsrc3.zip / BORDER.INC < prev    next >
Text File  |  1991-09-27  |  1KB  |  33 lines

  1. procedure BORDER (Surf: word; Mat: integer);
  2.  
  3. { Draw the border of surface #Surf in color Color }
  4. var Vert:   integer;                 { vertex # being plotted }
  5.     Node1:  word;                    { first node of line }
  6.     Node2:  word;                    { second node of line }
  7.     Color1, Color2: integer;         { 2 colors that bracket the shade }
  8.     Shade:  real;
  9.  
  10. begin
  11. {$ifdef BIGMEM}
  12. with ptrd^ do with ptre^ do with ptrh^ do with ptri^ do
  13. begin
  14. {$endif}
  15.   Shade := 1.0;
  16.   findcolors (Mat, Color[Mat], Shade, Color1, Color2);
  17.   for Vert := 1 to Nvert[Surf]-1 do begin
  18.     Node1 := Konnec (Surf, Vert);
  19.     Node2 := Konnec (Surf, Vert+1);
  20.     gdraw (round(Xtran[Node1]), round(Ytran[Node1]),
  21.           round(Xtran[Node2]), round(Ytran[Node2]), Color1);
  22.   end;
  23.  
  24.   { One last draw to close the polygon }
  25.   Node1 := Konnec (Surf, Nvert[Surf]);
  26.   Node2 := Konnec (Surf, 1);
  27.   gdraw (round(Xtran[Node1]), round(Ytran[Node1]),
  28.         round(Xtran[Node2]), round(Ytran[Node2]), Color1);
  29. {$ifdef BIGMEM}
  30. end; {with}
  31. {$endif}
  32. end; { procedure BORDER }
  33.